﻿
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="/static/css/common/reset.css" />
    <link rel="stylesheet" href="/static/css/associate.css" />
    <link rel="stylesheet" href="/static/css/sweetalert.min.css" />
    <link rel="stylesheet" href="/static/js/simditor/styles/simditor.css" />
    <link rel="stylesheet" href="/static/js/simditor/styles/simditor-html.css" />
    <link rel="stylesheet" href="/static/css/jquery-validate.css" />
    <title>社团首页</title>
</head>
<body>
    <div class="associate">
        <div id="divHeader"></div>
        <section class="assoc-content container clearfix">
            <div class="assoc-c-left fl">

                <div id="divNavigation"></div>
            </div>

            <!--修改密码-->
            <div class="assoc-c-right fr">
                <form id="secondStepForm">

                    <div class="assoc-cr-resiveInfo" id="revisePwd">
                        <div class="assoc-crb-resiveList">
                            <label>旧密码： </label>
                            <div class="form_control">
                                <input type="password" class="required" data-tip="请输入旧密码" data-valid="isNonEmpty" data-error="旧密码不能为空" placeholder="请输入旧密码" id="UserName" />
                            </div>
                        </div>
                        <div class="assoc-crb-resiveList">
                            <label>新密码</label>
                            <div class="form_control">
                                <input type="password" class="required" data-tip="请输入新密码" data-valid="isNonEmpty" data-error="新密码不能为空" placeholder="请输入新密码" id="password" required name="password" />
                            </div>
                        </div>
                        <div class="assoc-crb-resiveList">
                            <label>
                                确认密码
                            </label>
                            <div class="form_control">
                                <input type="password" class="required" data-tip="请确认密码" data-valid="isNonEmpty" data-error="密码不能为空" placeholder="请确认密码" />
                            </div>
                        </div>
                        <input type="button" class="assoc-crb-btn" value="保存" id="submit" />
                    </div>
                </form>
            </div>
        </section>
    </div>
    <div id="divFooter"></div>
    <script type="text/javascript" src="/static/js/ref/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="/static/js/self/common.js"></script>
    <script type="text/javascript" src="/static/js/ref/sweetalert.min.js"></script>
    <script src="/static/js/ref/sha512.js"></script>
    <script src="/static/js/ref/linq.min.js"></script>
    <script src="/static/js/ref/jquery.validate.js"></script>
    <script>
        common.validator($('form'));

        $("#divHeader").load("/wuc/header.html");
        $("#divFooter").load("/wuc/footer.html");
        $("#divNavigation").load("/wuc/navigation.html");

        common.ValidateFormJQ('secondStepForm', 'submit', submitSecondStep)
        function submitSecondStep() {
            var values = common.GetCtrlValues({
                ContentID: "secondStepForm"
            })
            common.commonAjax({ type: 'Post', url: '/api/User/UpdatePassword', data: values, sMethod: AfterAjax });
        };
        function AfterAjax(ctx) {
            if (ctx == null || ctx == "" || ctx.ResponseStr == "") {
                common.alertMessage("密码错误");
            }
            else {
                common.alertMessage("修改成功");
            }
        }
    </script>
</body>

</html>
